function Psychophysics_startup(pn)
% set paths for Psychophysics directory


fprintf('** Setting Psychophysics Paths **')
if nargin ==0 || isempty(pn), pn = 'C:\MATLAB\work\Psychophysics'; end

if ~exist(pn,'dir'), 'Path does not exist'; end

p = genpath(pn);
m = false(size(p));

s = findstr(p,';');

% ignore SVN directories
k = 1;
for i = 1:length(s)
    if findstr(p(k:s(i)),'.svn')
        m(k:s(i)) = true;
    end
    k = s(i)+1;
end

p(m) = [];

addpath(p);
clear
clc